﻿@using WebShop.Infrastructure;

<!DOCTYPE html>
<html>
<!--  lang="@Request.UserLanguages[0]" -->
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Css("Site.css")" rel="stylesheet" type="text/css"/>
    <link href="@Url.Css("jquery.ui.all.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Css("jquery.ui.autocomplete.css")" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="title">
                <h1>The food shop</h1>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>
            <div id="quicksearch">
                @using (Html.BeginForm("Index", "Products"))
                {
                    <label for="q" class="hint">Search...</label>
                    <input type="text" name="q" id="q" data-autocomplete="@Url.Action("QuickSearch", "Products")" data-href="@Url.Action("Details", "Products", new { id = "" })" />
                    <input type="submit" value="Find" />
                }
            </div>
            <div id="menucontainer">
                <ul id="menu">
                     @if (User.IsInRole(Constants.ROLE_CUSTOMER) || User.IsInRole(Constants.ROLE_ADMIN))
                     {
                        <li><a href="@Url.ProductsList()">Products</a></li>
                        <li>@Html.ActionLink("Categories", "Index", "Categories")</li>
                        <li>@Html.ActionLink("Orders", "Index", "Orders")</li>
                     }

                    @if (User.IsInRole(Constants.ROLE_ADMIN))
                    {
                        <li>@Html.ActionLink("Report", "Report", "Products")</li>                    
                        <li>@Html.ActionLink("Users", "Index", "Users")</li>
                        <li>@Html.ActionLink("Log", "Index", "Log")</li>
                    }
                    <li>@Html.ActionLink("Cart", "Index", "ProductsCart")</li>
                </ul>
            </div>
        </div>
        <div id="main">
            @RenderBody()
        </div>
        <div id="footer">
        </div>
    </div>
    <script src="@Url.Script("jquery-1.7.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Script("jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    <script src="@Url.Script("jquery-ui-1.8.20.min.js")" type="text/javascript"></script>
    <script src="@Url.Script("jquery.ui.i18n.all.min.js")" type="text/javascript"></script>
    @RenderSection("scripts", false)
    <script src="@Url.Script("WebShop.js")" type="text/javascript"></script>
    <script src="@Url.Script("MicrosoftAjax.js")" type="text/javascript"></script>
    <script src="@Url.Script("MicrosoftMvcAjax.js")" type="text/javascript"></script>
    <!--<script src="http://wiquery-plugins.googlecode.com/svn-history/r210/trunk/wiquery-plugins/wiquery-wijmo/src/main/resources/org/odlabs/wiquery/glob/jquery.glob.js" type="text/javascript"></script>
    <script src="http://wiquery-plugins.googlecode.com/svn-history/r210/trunk/wiquery-plugins/wiquery-wijmo/src/main/resources/org/odlabs/wiquery/glob/jquery.glob.all.js")" type="text/javascript"></script>-->
</body>
</html>
